package com.th.supcom.pds.common.enums;

/**
 * 医疗卡类型.
 */
public enum MedicareCardTypeEnum
{

    /**
     * 无效卡或刷卡有误. (value = 0)
     */
    Invalid ("0", "无效卡或刷卡有误"),
    /**
     * 就诊卡. (value = 1)
     */
    AttendanceCard ("1", "就诊卡"),
    /**
     * 健康卡或民康卡. (value = 2)
     */
    HealthCard ("2", "健康卡或民康卡"),

    /**
     * 健康卡或民康卡. (value = 3)
     */
    EmployeeCard ("3", "同济医院职工卡");

    private String m_code;
    private String m_name;

    private MedicareCardTypeEnum (String code, String name)
    {
        this.m_code = code;
        this.m_name = name;
    }

    public String getEnumCode ()
    {
        return this.m_code;
    }

    public String getEnumName ()
    {
        return this.m_name;
    }

    /**
     * 根据code获取枚举对象.
     * 
     * @param code
     * @return
     */
    public static MedicareCardTypeEnum getPtsRegMasterTypeEnum (String code)
    {
        if (null == code)
        {
            return null;
        }
        for (MedicareCardTypeEnum prmte : MedicareCardTypeEnum.values ())
        {
            if (prmte.getEnumCode ().equals (code))
            {
                return prmte;
            }
        }

        return null;
    }

    /** 公司版权信息. */
    public static final String copyright = "Copyright 2014, TH Supcom Corporation";

    /** 提交路径. */
    public static final String SCC_BRANCH = "$URL$";

    /** 提交日期. */
    public static final String SCC_LAST_MODIFICATION_DATE = "$Date$";

    /** 最终修改人员. */
    public static final String SCC_LAST_MODIFIER_NAME = "$Author$";

    /** 最终版本号. */
    public static final String SCC_REVISION = "$Revision$";
}
